
#include "sync_mutex.h"


static SDL_mutex *sync_mutex = NULL;


int sync_mutex_init(void)
{
	sync_mutex = SDL_CreateMutex();

	return 0;
}

int sync_mutex_lock(void)
{
	if(sync_mutex)
		SDL_LockMutex(sync_mutex);

	return 0;
}

int sync_mutex_unlock(void)
{
	if(sync_mutex)
		SDL_UnlockMutex(sync_mutex);

	return 0;
}

int sync_mutex_deinit(void)
{
	if(sync_mutex){
		SDL_DestroyMutex(sync_mutex);
		sync_mutex = NULL;
	}

	return 0;
}





